package com.teamtgv.shareshark.location;

import android.app.ProgressDialog;
import android.content.Context;

public class LocationRetriever {

	private Context context;
	private final ProgressDialog dialog;
	
	public LocationRetriever(Context context) {
		this.context = context;
		this.dialog = new ProgressDialog(context);
	}
	
	

	public String getLocation() {
		dialog.setMessage("Retrieving location...");
		dialog.setIndeterminate(false);
		dialog.setCancelable(false);
		dialog.show();
        LocationHelper locationHelper = new LocationHelper();
        String locationResult = locationHelper.getLocation(context);
        this.dialog.dismiss();
        return locationResult;
    }
	
}
